#include <func.h>

void sigAction(int signum,siginfo_t* info,void* a)
{
    printf("sig:%d :action slepp 2 seconds...\n",signum);
    sleep(2);
    printf("sig:%d :action is over\n",signum);
}
int main(int argc,char **argv)
{
    struct sigaction act;
    memset(&act,0,sizeof(act));
    act.sa_sigaction =sigAction;
    act.sa_flags = SA_SIGINFO|SA_NODEFER;
    sigaction(SIGINT,&act,NULL);
    sigaction(SIGQUIT,&act,NULL);
    while(1);
    return 0;
}

